<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

</main>
</div>

<%-- ajax loding动态图 --%>
<div id="ajaxOverlay" style="position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, .1); z-index: 99999;">
    <img style='width: 20px;height:20px;position: fixed;left:50%;top:50%;' src='/jn-report/img/loading.gif'/>
</div>



<%--/*** 左侧侧边栏事件 **/--%>
<script>
    jQuery(function($) {
        $("#toggle-sidebar").click(function(){
            $(".page-wrapper").toggleClass("toggled");
        });
        $("#toggle-sidebar").click();
        $("#ajaxOverlay").hide();
    });
</script>
<script>
    /*** 重置按钮事件 **/
    $('#reset_btn').click(function (){ location.reload(); });

    /*** 加载Report查询条件到Map **/
    function loadConditionMapData() {
        var conditionMap = {};
        if ($("#startTime").length > 0) conditionMap['start_time'] = $.trim($("#startTime").val());
        if ($("#endTime").length > 0) conditionMap['end_time'] = $.trim($("#endTime").val());
        if ($("#fabIdSumo").length > 0) conditionMap['fab_id'] = $.trim($("#fabIdSumo").val());
        if ($("#bayIdSumo").length > 0) conditionMap['bay_id'] = $.trim($("#bayIdSumo").val());
        if ($("#ivLineSumo").length > 0) conditionMap['bay_id'] = $.trim($("#ivLineSumo").val());
        if ($("#opeIdSumo").length > 0) conditionMap['ope_id'] = $.trim($("#opeIdSumo").val());
        if ($("#toolgIdSumo").length > 0) conditionMap['toolg_id'] = $.trim($("#toolgIdSumo").val());
        if ($("#toolTypeRadio").length > 0) conditionMap['tool_type'] = $.trim($("#toolTypeRadio input:checked").val())
        if ($("#toolIdSumo").length > 0) conditionMap['tool_id'] = $.trim($("#toolIdSumo").val());
        if ($("#toolMainIdSumo").length > 0) conditionMap['tool_main_id'] = $.trim($("#toolMainIdSumo").val());
        if ($("#toolSubIdSumo").length > 0) conditionMap['tool_sub_id'] = $.trim($("#toolSubIdSumo").val());
        if ($("#shiftIdSumo").length > 0) conditionMap['shift_id'] = $.trim($("#shiftIdSumo").val());
        if ($("#collectTypeSumo").length > 0) conditionMap['collect_type'] = $.trim($("#collectTypeSumo").val());
        if ($("#reportTypeRadio").length > 0) conditionMap['report_type'] = $.trim($("#reportTypeRadio input:checked").val());
        if ($("#dataGroupSumo").length > 0) conditionMap['data_group'] = $.trim($("#dataGroupSumo").val());
        if ($("#controlChartGrpSumo").length > 0) conditionMap['control_chart_grp'] = $.trim($("#controlChartGrpSumo").val());
        if ($("#controlChartSumo").length > 0) conditionMap['control_chart'] = $.trim($("#controlChartSumo").val());
        if ($("#boatNumberSumo").length > 0) conditionMap['boat_number'] = $.trim($("#boatNumberSumo").val());
        if ($("#pmTypeRadio").length > 0) conditionMap['pm_type'] = $.trim($("#pmTypeRadio input:checked").val());
        if ($("#lotNumberSumo").length > 0) conditionMap['lot_number'] = $.trim($("#lotNumberSumo").val());
        if ($("#specSumo").length > 0) conditionMap['spec'] = $.trim($("#specSumo").val());
        if ($("#waferSpecSumo").length > 0) conditionMap['wafer_spec'] = $.trim($("#waferSpecSumo").val());
        if ($("#manufacturerSumo").length > 0) conditionMap['manufacturer'] = $.trim($("#manufacturerSumo").val());
        if ($("#baseIdSumo").length > 0) conditionMap['base_id'] = $.trim($("#baseIdSumo").val());
        if ($("#attributesSumo").length > 0) conditionMap['attributes'] = $.trim($("#attributesSumo").val());
        if ($("#effNoSumo").length > 0) conditionMap['eff_no'] = $.trim($("#effNoSumo").val());
        if ($("#gearSumo").length > 0) conditionMap['gear'] = $.trim($("#gearSumo").val());
        if ($("#binSumo").length > 0) conditionMap['bin'] = $.trim($("#binSumo").val());
        //if ($("#lotIdSumo").length > 0) conditionMap['lot_id'] = $.trim($("#lotIdSumo").val());
        if ($("#lotIdText").length > 0) conditionMap['lot_id'] = $.trim($("#lotIdText").val());
        //if ($("#mtrlPordIdSumo").length > 0) conditionMap['mtrl_prod_id_fk'] = $.trim($("#mtrlPordIdSumo").val());
        if ($("#mtrlPordIdText").length > 0) conditionMap['mtrl_prod_id_fk'] = $.trim($("#mtrlPordIdText").val());
        if ($("#groupByRadio").length > 0) conditionMap['group_by'] = $.trim($("#groupByRadio input:checked").val());
        if ($("#groupBy2Radio").length > 0) conditionMap['group_by'] = $.trim($("#groupBy2Radio input:checked").val());
        if ($("#toolStatSumo").length > 0) conditionMap['tool_stat'] = $.trim($("#toolStatSumo").val());
        if ($("#summaryOrDetailRadio").length > 0) conditionMap['summary_or_detail'] = $.trim($("#summaryOrDetailRadio input:checked").val());
        if ($("#mtrlFabIdSumo").length > 0) conditionMap['mtrl_fab_id'] = $.trim($("#mtrlFabIdSumo").val());
        if ($("#showHidePointRadio").length > 0) conditionMap['show_hide_point'] = $.trim($("#showHidePointRadio input:checked").val());
        if ($("#pipeNumberSumo").length > 0) conditionMap['pipe_number'] = $.trim($("#pipeNumberSumo").val());
        if ($("#zhNumberSumo").length > 0) conditionMap['zh_number'] = $.trim($("#zhNumberSumo").val());
        if ($("#zhCountSumo").length > 0) conditionMap['zh_count'] = $.trim($("#zhCountSumo").val());
        if ($("#zhPlaceSumo").length > 0) conditionMap['zh_place'] = $.trim($("#zhPlaceSumo").val());
        if ($("#pecvdIdText").length > 0) conditionMap['pecvd_id'] = $.trim($("#pecvdIdText").val());
        if ($("#componentCellEfficiencySumo").length > 0) conditionMap['component_cell_efficiency'] = $.trim($("#componentCellEfficiencySumo").val());
        if ($("#productMaterialText").length > 0) conditionMap['product_material'] = $.trim($("#productMaterialText").val());
        if ($("#productMaterialSumo").length > 0) conditionMap['product_material'] = $.trim($("#productMaterialSumo").val());
        if ($("#bomMaterialText").length > 0) conditionMap['bom_material'] = $.trim($("#bomMaterialText").val());
        if ($("#bomMaterialSumo").length > 0) conditionMap['bom_material'] = $.trim($("#bomMaterialSumo").val());
        return conditionMap;
    }

    /*** 加载ECharts数据 **/
    function loadEchartsData(myChart, $charts, echartsData) {
        if ($charts.length > 0) {
            //option.title.yAxis[0].name = echartsData.yAxisName;
            option.title.text = echartsData.title;
            option.legend.data = [];
            option.legend.data = echartsData.legendData;
            option.xAxis[0].data = [];
            option.xAxis[0].data = echartsData.xAxisData;
            option.series = [];
            for (var i = 0; i < echartsData.seriesDatas.length; i++) {
                option.series.push({
                    name: echartsData.legendData[i],
                    type: 'line',
                    data: echartsData.seriesDatas[i],
                    //label: {normal: {show: true, color: 'green'}}
                });
            }
            myChart.clear();
            myChart.setOption(option);
        }
    }

    /*** 初始化Grid和Chart，或者清除历史数据 **/
    function initGridAndChart() {
        if ($("#pqGrid").length > 0) {
            _pqUtil.f.createGrid($("#pqGrid"));
            _pqUtil.f.cleanAndResetGrid($("#pqGrid"));
        }
        if ($("#pqGrid_detail").length > 0) {
            _pqUtil.f.createGrid($("#pqGrid_detail"));
            _pqUtil.f.cleanAndResetGrid($("#pqGrid_detail"));
        }
        if ($("#charts").length > 0) myChart.clear();
        if ($("#charts3").length > 0) myChart3.clear();
    }
</script>
</body>
</html>
